﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp1
{
    class Program
    {
        static void Main() 
        {
            shangdian();
        }
        static void dongwu(string[] args)
        {
            LaoHu a = new LaoHu();
            a.Tui = 4;
            a.Zhoulu();
            a.Chifan();
            a.Shuijiao();
            a.Jiao();
            a.Laohu();

            Console.WriteLine();

            Mao b = new Mao();
            b.Tui = 4;
            b.Zhoulu();
            b.Chifan();
            b.Shuijiao();
            b.Jiao();
            b.Maomi();

            Console.WriteLine();

            LaoYing c = new LaoYing();
            c.Tui = 2;
            c.Zhoulu();
            c.Chifan();
            c.Shuijiao();
            c.Jiao();
            c.Laoying();

            Console.WriteLine();
            YanZi d = new YanZi();
            d.Tui = 2;
            d.Zhoulu();
            d.Chifan();
            d.Shuijiao();
            d.Jiao();
            d.Yanzi();
    }
        static void shangdian() 
        {
            Console.WriteLine("欢迎来到xx宠物店，请问你要寄存什么动物呢：1、猫；2、燕子；3、老鹰；4、老虎");
            int key = int.Parse(Console.ReadLine());
            Animal a;
            switch (key)
            {
                case 1:
                    a = new Mao();
                    break;
                case 2:
                    a = new YanZi();
                    break;
                case 3:
                    a = new LaoHu();
                    break;
                case 4:
                    a = new LaoYing();
                    break;
                default:
                    Console.WriteLine("你别乱选。");
                    a = new LaoHu();
                    break;
            }

            ChongWuShangDian ps = new ChongWuShangDian();
            ps.ConsignAnimal(a);
        }

    }
}
